import logging

# 配置日志
logging.basicConfig(filename='example.log', level=logging.DEBUG,
                    format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')

# 创建 Logger 对象
logger = logging.getLogger(__name__)

# 输出不同级别的日志信息
logger.debug('This is a debug message')
logger.info('45416')
